<?php #title=Бренды;

	$html = '<p><h1>Редактор брендов</h1></p>'.
		$load->block('table_editor',array(
			'control_name'	=> 'Быстрое редактирование',
			'can_edit'		=> true,
			'dev'			=> true,
			'select'		=> array('from' => 'store_product_brand'),
			'delete'		=> array('DELETE FROM store_product_brand WHERE ID IN(#sys_ids#)'),
			'insert'		=> 'INSERT INTO store_product_brand SET name = "#name#", name_rus = "#name_rus#", url = "#getGoodUrl|name#"',
			'update'		=> 'UPDATE store_product_brand SET name = "#name#", name_rus = "#name_rus#", url = "#url#" WHERE id = #sys_id#',
			'fields'		=> array(
				'id'		=> array('title' => 'ID', 'sys_id' => true, 'to_edit' => false ),
				'name'		=> array('title' => 'Бренд англ'),
				'name_rus'	=> array('title' => 'Бренд рус'),
				'url'		=> array('title' => 'Ссылка'),
				// array('link'=>"<a href='?p=brand&action=edit&id=#id#'>Редактировать</a>", 'to_edit'=>0),
			),
			'link_replaces'	=> array('parents')
		));
	
	$view->gText .= $html;
